#include <iostream>
#include <cmath>
using ll = long long;
using namespace std;

// 已知
ll n;
// 未知

int main()
{
    cin >> n;
    ll i = pow(n, 1.0 / 3.0), j = 1;
    while (i < 6e8)
    {
        while (i * i * i - j * j * j > n) ++j;
        if (i * i * i - j * j * j == n)
        {
            cout << i << " " << j << endl;
            return 0;
        }
        ++i;
    }
    cout << -1;
    return 0;
}